#pragma once
#include "VideoDecoder.h"
#include "RTPUnpacker.h"
class ESDecoder :
	public VideoDecoder
{
public:
	ESDecoder();
	~ESDecoder(void);

	void startRecvThread();
	void startDecodeThread();

private:

	char* recvBuf;
	RTPUnpacker* unpacker;
	int lostPacket;

	unsigned char* ESBuffer;
	unsigned char* ESBufferFrame;
	//int PSFrameReceiveOffset;
	int ESBufferOffset;

	AVCodec *codec;
	AVCodecContext *c;

	AVPacket avpkt;
};

